<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="/static/css/style.css" rel="stylesheet" type="text/css" />
</head>

<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">首页</a></li>
    <li><a href="#">表单</a></li>
    </ul>
    </div>
    
    <div class="formbody">
    
    <div class="formtitle"><span>基本信息</span></div>
    
    <form action="{:url('zhu/add')}" method="post" >
    <ul class="forminfo">
    <li><label>文章标题</label><input name="title" type="text" class="dfinput" id="username" onblur="Title()" /><span id="user"></span></li>
    <li><label>关键字</label><input name="keyword" type="text" class="dfinput" id="keyword" onblur="Keyword()"/><span id="gjz"></span></li>
    <li><label>是否审核</label><input name="is" type="radio" value="已审核" />已审核
                                    <input name="is" type="radio" value="未审核" />未审核</li>
    <li><label>引用地址</label><input name="url" type="text" class="dfinput" placeholder="http://www..com/html/uidesign/" ="http://www..com/html/uidesign/"  id="url"  onblur="Url()"/><span id="yy"></span></li>
    <li><label>文章内容</label> <textarea name="content" cols="" rows="" class="textinput" id="content" onblur="Content()"></textarea><span id="nr"></span></li>
     <!-- 百度编辑器 -->
    <script id="container" name="content" type="text/plain">
    </script>
    <!-- 配置文件 -->
    <script type="text/javascript" src="/static/ueditor/ueditor.config.js"></script>
    <!-- 编辑器源码文件 -->
    <script type="text/javascript" src="/static/ueditor/ueditor.all.js"></script>
    <!-- 实例化编辑器 -->
    <script type="text/javascript">
        var ue = UE.getEditor('container');
    </script>


    <li><label>&nbsp;</label><input name="" type="submit" class="btn" value="确认保存"  onclick="return Zong()" /></li>
    </ul>
    </form>
    
    </div>
</body>
</html>

<script src="/static/jq.js"></script>
<script>
    function Title(){
    var vi = document.getElementById("username").value;
  if(vi.trim().length==0){
  $("#user").html("<span><font color='red'>请输入文章标题</font></span>");
  return false;
  }else{
    $("#user").html("<span><font color='green'>输入正确</font></span>");
    return true;
  }  
}
function Keyword(){
    var vi = document.getElementById("keyword").value;
if(vi.trim().length==0){
  $("#gjz").html("<span><font color='red'>请输入关键字</font></span>");
  return false;
  }else{
    $("#gjz").html("<span><font color='green'>输入正确</font></span>");
    return true;
  }
}


function Url(){
    var vi = document.getElementById("url").value;
if(vi.trim().length==0){
  $("#yy").html("<span><font color='red'>请输入引入地址</font></span>");
  return false;
  }else{
    $("#yy").html("<span><font color='green'>输入正确</font></span>");
    return true;
  }
}


function Content(){
    var vi = document.getElementById("content").value;
if(vi.trim().length==0){
  $("#nr").html("<span><font color='red'>请输入内容</font></span>");
  return false;
  }else{
    $("#nr").html("<span><font color='green'>输入正确</font></span>");
    return true;
  }
}

function Zong(){
    if (Title() && Keyword() && Url() && Content()) {
       return true;
    }else{
        return false;
    }


}

</script>




